<template>
  <div>
    <div class="game-info">
      <el-col :span="3">
        <div>{{ tableData.column1 }}</div>
      </el-col>
      <el-col :span="9">
        <div class="game-a">{{ tableData.column2 }}</div>
      </el-col>
      <el-col :span="3">
        <div class="game-vs">{{ tableData.column3 }}</div>
      </el-col>
      <el-col :span="9">
        <div class="game-b">
          {{ tableData.column4 }}
        </div>
      </el-col>
    </div>
    <div class="game-table-data">
      <el-row :gutter="24">
        <el-col :span="3" class="col-style-1">
          <el-table :data="reportData" style="width: 100%">
            <el-table-column prop="TABLE" label="台号" header-align="center" align="center">
            </el-table-column>
          </el-table>
        </el-col>
        <el-col :span="9" class="col-style">
          <el-table :data="reportData" style="width: 100%">
            <el-table-column prop="NUMBER_B" label="黑棋编号"> </el-table-column>
            <el-table-column label="黑棋姓名">
              <template slot-scope="scope">
                <div style="color:rgba(230,24,71,1)">
                  {{ scope.row.NAME_B }}
                </div>
              </template>
            </el-table-column>
            <el-table-column prop="UNIT_B" label="黑棋单位" min-width="120%"> </el-table-column>
            <el-table-column
              prop="SCORE_B"
              label="黑棋前轮积分"
              header-align="center"
              align="center"
              min-width="110"
            ></el-table-column>
          </el-table>
        </el-col>
        <el-col :span="3" class="col-style">
          <el-table :data="startList" style="width: 100%" header-align="center">
            <el-table-column prop="" header-align="center">
              <template slot="header" slot-scope="scope">
                <div class="game-vs-logo"></div>
              </template>
            </el-table-column>
          </el-table>
        </el-col>
        <el-col :span="9" class="col-style-2">
          <el-table :data="reportData" style="width: 100%">
            <el-table-column prop="NUMBER_W" label="白棋编号"> </el-table-column>
            <el-table-column prop="NAME_W" label="白棋姓名">
              <template slot-scope="scope">
                <div style="color:rgba(60,135,247,1)">
                  {{ scope.row.NAME_W }}
                </div>
              </template>
            </el-table-column>
            <el-table-column prop="UNIT_W" label="白棋单位" min-width="120%"> </el-table-column>
            <el-table-column
              prop="SCORE_W"
              label="白棋前轮积分"
              header-align="center"
              align="center"
              min-width="110"
            ></el-table-column>
          </el-table>
        </el-col>
      </el-row>
    </div>
  </div>
</template>
<script>
import { mapState } from 'vuex'
export default {
  created() {
    this.venueName = this.$route.query.venueName
    this.gameTime = this.$route.query.gameTime
    this.gameTitle = this.$route.query.gameTitle
    this.filePath = this.$route.query.filePath
    // this.getReportData()
  },
  props: {},
  data() {
    return {
      tableData: {
        column1: '对阵',
        column2: '黑棋',
        column3: 'VS',
        column4: '白棋'
      },
      filePath: '',
      venueName: '',
      gameTime: '',
      gameTitle: '',
      startList: [
        {
          TABLE: '1',
          NUMBER_B: '1',
          NAME_B: '李轩豪 ',
          SCORE_B: '4',
          UNIT_B: '重庆',
          SCORE_W: '4',
          NUMBER_W: '5',
          NAME_W: '张  强 ',
          UNIT_W: '西藏'
        },
        {
          TABLE: '2',
          NUMBER_B: '11',
          NAME_B: ' 柁嘉熹 ',
          SCORE_B: '4',
          UNIT_B: '黑龙江',
          SCORE_W: '4',
          NUMBER_W: '14',
          NAME_W: ' 范廷钰 ',
          UNIT_W: '山东'
        },
        {
          TABLE: '3',
          NUMBER_B: '15',
          NAME_B: ' 李  喆 ',
          SCORE_B: '4',
          UNIT_B: '湖北',
          SCORE_W: '4',
          NUMBER_W: '23',
          NAME_W: ' 韩一洲 ',
          UNIT_W: '北京'
        },
        {
          TABLE: '4',
          NUMBER_B: '2',
          NAME_B: ' 李建宇 ',
          SCORE_B: '2',
          UNIT_B: '河北',
          SCORE_W: '4',
          NUMBER_W: '26',
          NAME_W: ' 李钦诚 ',
          UNIT_W: '浙江'
        },
        {
          TABLE: '5',
          NUMBER_B: '6',
          NAME_B: ' 王星昊 ',
          SCORE_B: '2',
          UNIT_B: '上海',
          SCORE_W: '2',
          NUMBER_W: '3',
          NAME_W: ' 韦一博 ',
          UNIT_W: '厦门'
        },
        {
          TABLE: '6',
          NUMBER_B: '9',
          NAME_B: ' 柯  洁 ',
          SCORE_B: '2',
          UNIT_B: '云南',
          SCORE_W: '2',
          NUMBER_W: '7',
          NAME_W: ' 陈一纯 ',
          UNIT_W: '西藏'
        },
        {
          TABLE: '7',
          NUMBER_B: '10',
          NAME_B: ' 廖元赫 ',
          SCORE_B: '2',
          UNIT_B: '四川',
          SCORE_W: '2',
          NUMBER_W: '16',
          NAME_W: ' 焦士维 ',
          UNIT_W: '云南'
        },
        {
          TABLE: '8',
          NUMBER_B: '17',
          NAME_B: ' 甘思阳 ',
          SCORE_B: '2',
          UNIT_B: '深圳',
          SCORE_W: '2',
          NUMBER_W: '20',
          NAME_W: ' 陈  贤 ',
          UNIT_W: '江苏'
        },
        {
          TABLE: '9',
          NUMBER_B: '18',
          NAME_B: ' 李雨昂 ',
          SCORE_B: '2',
          UNIT_B: '辽宁',
          SCORE_W: '2',
          NUMBER_W: '21',
          NAME_W: ' 杨宗煜 ',
          UNIT_W: '北京'
        },
        {
          TABLE: '10',
          NUMBER_B: '22',
          NAME_B: ' 马逸超 ',
          SCORE_B: '2',
          UNIT_B: '四川',
          SCORE_W: '2',
          NUMBER_W: '27',
          NAME_W: ' 程宏昊 ',
          UNIT_W: '广东'
        },
        {
          TABLE: '11',
          NUMBER_B: '4',
          NAME_B: ' 张家尧 ',
          SCORE_B: '0',
          UNIT_B: '内蒙古',
          SCORE_W: '2',
          NUMBER_W: '28',
          NAME_W: ' 张亚博 ',
          UNIT_W: '陕西'
        },
        {
          TABLE: '12',
          NUMBER_B: '8',
          NAME_B: ' 张浩伟 ',
          SCORE_B: '0',
          UNIT_B: '安徽',
          SCORE_W: '0',
          NUMBER_W: '12',
          NAME_W: ' 陈昱森 ',
          UNIT_W: '广东'
        },
        {
          TABLE: '13',
          NUMBER_B: '13',
          NAME_B: ' 黄春棋 ',
          SCORE_B: '0',
          UNIT_B: '河南',
          SCORE_W: '0',
          NUMBER_W: '19',
          NAME_W: ' 薛冠华 ',
          UNIT_W: '河北'
        },
        {
          TABLE: '14',
          NUMBER_B: '24',
          NAME_B: '王音灵水',
          SCORE_B: '0',
          UNIT_B: '新疆',
          SCORE_W: '0',
          NUMBER_W: '25',
          NAME_W: ' 徐泽鑫',
          UNIT_W: '煤矿体协'
        },
        {
          TABLE: '1',
          NUMBER_B: '4',
          NAME_B: '时  越 ',
          SCORE_B: '4',
          UNIT_B: '上海',
          SCORE_W: '4',
          NUMBER_W: '5',
          NAME_W: '石豫来 ',
          UNIT_W: '陕西'
        },
        {
          TABLE: '2',
          NUMBER_B: '13',
          NAME_B: ' 舒一笑 ',
          SCORE_B: '4',
          UNIT_B: '煤矿体协',
          SCORE_W: '4',
          NUMBER_W: '18',
          NAME_W: ' 何语涵 ',
          UNIT_W: '重庆'
        },
        {
          TABLE: '3',
          NUMBER_B: '20',
          NAME_B: ' 柳琪峰 ',
          SCORE_B: '4',
          UNIT_B: '云南',
          SCORE_W: '4',
          NUMBER_W: '26',
          NAME_W: ' 江维杰 ',
          UNIT_W: '山东'
        },
        {
          GROUP: '',
          TABLE: '4',
          NUMBER_B: '1',
          NAME_B: ' 陈梓健 ',
          SCORE_B: '2',
          UNIT_B: '山东',
          SCORE_W: '4',
          NUMBER_W: '28',
          NAME_W: ' 赵晨宇 ',
          UNIT_W: '江苏'
        },
        {
          GROUP: '',
          TABLE: '5',
          NUMBER_B: '3',
          NAME_B: ' 陈  浩 ',
          SCORE_B: '2',
          UNIT_B: '西藏',
          SCORE_W: '2',
          NUMBER_W: '6',
          NAME_W: ' 谢  科 ',
          UNIT_W: '浙江'
        },
        {
          GROUP: '',
          TABLE: '6',
          NUMBER_B: '7',
          NAME_B: ' 李成森 ',
          SCORE_B: '2',
          UNIT_B: '煤矿体协',
          SCORE_W: '2',
          NUMBER_W: '9',
          NAME_W: ' 刘兆哲 ',
          UNIT_W: '河南'
        },
        {
          GROUP: '',
          TABLE: '7',
          NUMBER_B: '8',
          NAME_B: ' 许瀚文 ',
          SCORE_B: '2',
          UNIT_B: '广东',
          SCORE_W: '2',
          NUMBER_W: '12',
          NAME_W: ' 陈豪鑫 ',
          UNIT_W: '厦门'
        },
        {
          GROUP: '',
          TABLE: '8',
          NUMBER_B: '15',
          NAME_B: ' 唐韦星 ',
          SCORE_B: '2',
          UNIT_B: '江苏',
          SCORE_W: '2',
          NUMBER_W: '19',
          NAME_W: ' 杨文铠 ',
          UNIT_W: '北京'
        },
        {
          GROUP: '',
          TABLE: '9',
          NUMBER_B: '16',
          NAME_B: ' 郭信驿 ',
          SCORE_B: '2',
          UNIT_B: '新疆',
          SCORE_W: '2',
          NUMBER_W: '21',
          NAME_W: ' 严在明 ',
          UNIT_W: '黑龙江'
        },
        {
          GROUP: '',
          TABLE: '10',
          NUMBER_B: '22',
          NAME_B: ' 陈  磊 ',
          SCORE_B: '2',
          UNIT_B: '陕西',
          SCORE_W: '2',
          NUMBER_W: '23',
          NAME_W: ' 杨鼎新 ',
          UNIT_W: '重庆'
        },
        {
          GROUP: '',
          TABLE: '11',
          NUMBER_B: '2',
          NAME_B: ' 冯  昊 ',
          SCORE_B: '0',
          UNIT_B: '河北',
          SCORE_W: '2',
          NUMBER_W: '24',
          NAME_W: ' 童梦成 ',
          UNIT_W: '浙江'
        },
        {
          GROUP: '',
          TABLE: '12',
          NUMBER_B: '10',
          NAME_B: ' 黄明宇 ',
          SCORE_B: '0',
          UNIT_B: '上海',
          SCORE_W: '0',
          NUMBER_W: '11',
          NAME_W: ' 黄一鸣 ',
          UNIT_W: '深圳'
        },
        {
          GROUP: '',
          TABLE: '13',
          NUMBER_B: '14',
          NAME_B: ' 周玉川 ',
          SCORE_B: '0',
          UNIT_B: '大连',
          SCORE_W: '0',
          NUMBER_W: '17',
          NAME_W: ' 陈必森 ',
          UNIT_W: '海南'
        },
        {
          GROUP: '',
          TABLE: '14',
          NUMBER_B: '25',
          NAME_B: ' 郑载想',
          SCORE_B: '0',
          UNIT_B: '四川',
          SCORE_W: '0',
          NUMBER_W: '27',
          NAME_W: ' 韩卓然',
          UNIT_W: '厦门'
        }
      ],
      singleItemList: [
        {
          name: '围棋',
          logo: require('@/assets/img/daily/GO.png'),
          flag: true
        }
      ]
    }
  },
  watch: {},
  computed: {
    ...mapState({
      reportData: state => state.schedule.reportData
    })
  },
  filters: {},
  components: {},
  methods: {
    getReportData() {
      this.$store
        .dispatch('getReportData', this.filePath + '.txt')
        .then(_ => {})
        .catch(error => {
          console.log(error)
        })
    }
  }
}
</script>
<style scoped lang="scss">
@import '@/assets/scss/item.scss';
</style>
